﻿using BCEntity.WeChatComponent.WeChatNewsMaterialArticleRecord;
using System;
using System.Collections.Generic;
using System.Text;

namespace BCData.WeChatComponent.WeChatNewsMaterialArticleRecord
{
    /// <summary>
    /// 微信图文素材文章记录数据处理接口
    /// </summary>
    public interface IWeChatNewsMaterialArticleRecordData
    {
        /// <summary>
        /// 添加文章记录
        /// </summary>
        /// <param name="weChatNewsMaterialArticleRecordEntity">添加文章记录</param>
        /// <returns></returns>
        bool Add(WeChatNewsMaterialArticleRecordEntity weChatNewsMaterialArticleRecordEntity);

        /// <summary>
        /// 修改文章记录
        /// </summary>
        /// <param name="weChatNewsMaterialArticleRecordEntity">添加文章记录</param>
        /// <returns></returns>
        bool Update(WeChatNewsMaterialArticleRecordEntity weChatNewsMaterialArticleRecordEntity);
        /// <summary>
        /// 删除文章记录
        /// </summary>
        /// <param name="mediaId">图文素材Id</param>
        /// <returns></returns>
        bool Delete(string mediaId);
        /// <summary>
        /// 删除单个文章
        /// </summary>
        /// <param name="weChatNewsMaterialArticleRecordId">文章记录Id</param>
        /// <returns></returns>
        bool DeleteArticle(string weChatNewsMaterialArticleRecordId);
        /// <summary>
        /// 获取图文文章列表
        /// </summary>
        /// <param name="mediaId">图文素材Id</param>
        /// <returns></returns>
        IEnumerable<WeChatNewsMaterialArticleRecordEntity> Get(string mediaId);

        /// <summary>
        /// 获取图文文章列表
        /// </summary>
        /// <param name="title">文章标题</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="ascending">排序</param>
        /// <param name="dataCount">数据总数</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        IEnumerable<WeChatNewsMaterialArticleRecordEntity> Get(string title, DateTime? start, DateTime? end, bool? ascending, out int dataCount, int pageIndex=1,int pageSize=10);
    }
}
